From 344e8cf09d3a7fde01849f8eb2d442746b63aafe Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Tue, 23 Mar 2021 12:58:39 -0600 Subject: [PATCH] fix erroneous Qt translation caught by PVS studio. V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing. This makes me wonder if this code is ever used. If args == "OutputFromUnit" it would throw a fatal error since b9cdbe4e8dc02cff07af9e0fa28adb2372337963 Oct 22, 2013 --- garmin_device_xml.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/garmin_device_xml.cc b/garmin_device_xml.cc index 593670f3c..459149525 100644 --- a/garmin_device_xml.cc +++ b/garmin_device_xml.cc @@ -79,7 +79,7 @@ void dir_s(xg_string args, const QXmlStreamAttributes*) if (type) { return; } - if ((args == "OutputFromUnit")) { + if (args == "OutputFromUnit") { xasprintf(&my_gdx_info->from_device.path, "%s%c%s", mountpoint, GB_PATHSEP, path); my_gdx_info->from_device.basename = xstrdup(base); @@ -88,7 +88,7 @@ void dir_s(xg_string args, const QXmlStreamAttributes*) my_gdx_info->from_device.path, my_gdx_info->from_device.basename, my_gdx_info->from_device.extension); - } if ((args == "InputToUnit")) { + } else if (args == "InputToUnit") { xasprintf(&my_gdx_info->to_device.path, "%s%c%s", mountpoint, GB_PATHSEP, path); my_gdx_info->to_device.basename = xstrdup(base); -- 2.30.2